php get all values from associative array

84

php get all values from associative array certain key -

$ids = array_column($users, 'id');

php return associative array -

function myfunc(){
    $arr = array();
    $arr[] = 'value0';
    $arr['key1'] = 'value1';
    $arr['key2'] = 'value2';
    $arr[] = 'value3';
    return $arr;
}

Comments

Submit
0 Comments